package com.faithbj.process;

/**
 * User: xiongyuanwei
 * Date: 12-6-17
 * Time: 下午5:33
 */
public enum State {

    STATE(0L, "流程开始", "Start", true),
    NEW_ARRIVAL(1L, "业务受理", "Arrive", true),
    COMPLETION(2L, "信息录入", "Input", true),
    VERIFICATION(3L, "信息核实", "Verify", true, "对应街镇核实"),
    EXPORT(4L, "信息导出", "Export", true),
    IMPORT(5L, "信息导入", "Import", false),
    SEND_AND_RECEIVE_FOR_COMPARISON(6L, "比对信息发送接收", "Send/Receive", false),
    COMPARISON(7L, "准入标准核实比对", "Compare", false),
    COMPARISON_DONE(8L, "准入标准已核实", "", false),
    FIRST_CHECK(9L, "比对审核", "Check1", false),
    FIRST_CHECK_MODIFICATION(10L, "修改核定值", "Modify", false, "对应一次审核"),
    CHECK_TABLE_GENERATED(11L, "生成核对表", "", false),
    DIFF_TABLE_GENERATED(12L, "生成差异表", "", false),
    SECOND_CHECK(13L, "抽查", "Check2", false, "对应二次审核"),
    REPORT(14L, "生成核对报告", "Report", false),
    INTERRUPTED(15L, "中止核对", "Interrupt", false),
    TERMINATED(16L, "流程正常结束", "End", false),
    CANCELLED(17L, "自愿退出申请", "Cancel", false),
    KILLED(18L, "强制结束流程", "Kill", false),
    TERMINATION_CHECK(19L, "终止核对", "Terminate", false),
    SECOND_CHECK_SELECT(20L, "抽查选择", "Select", false);

    private Long id;
    private String name;
    private String nodeName;
    private String description;
    private boolean outer;

    private State(Long id, String name, String nodeName, boolean outer) {
        this.id = id;
        this.name = name;
        this.nodeName = nodeName;
        this.description = name;
        this.outer = outer;
    }

    private State(Long id, String name, String nodeName, boolean outer, String description) {
        this.id = id;
        this.name = name;
        this.nodeName = nodeName;
        this.outer = outer;
        this.description = description;
    }

    public Long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public boolean isOuter() {
        return outer;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "State{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", nodeName='" + nodeName + '\'' +
                ", description='" + description + '\'' +
                ", outer=" + outer +
                '}';
    }
}
